package slash.util;

import java.util.*;

import org.newdawn.slick.Animation;
import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;

import slash.constants.Globals;

public class ResourceManager {
	
	private HashMap<String,Animation> animations = new HashMap<String,Animation>();
	//private HashMap<String,String> mapPaths = new HashMap<String,String>();
	
	/**
	 * loads resources into hashmap for easier accessability
	 */
	public void loadResources(){
		loadAnimations();
	}
	
	/*public Image getImage(String key){
		return images.get(key);
	}*/
	
	private void loadAnimations(){
		//this.addPlayerAnimation(Globals.ANIMATION_RIGHT, "sprites/player_rt1.gif","sprites/player_rt2.gif", 300);
        
	}
	
	private void addPlayerAnimation(String key, String pathA, String pathB, int duration) throws SlickException{
		Image imageA = new Image(pathA);
		Image imageB = new Image(pathB);
		
		Animation animation = new Animation(false);
		animation.setLooping(true);
		animation.addFrame(imageA, duration);
		animation.addFrame(imageB, duration);
		animation.setSpeed(1);
	}

}
